<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Sequences</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="GLib Reference Manual">
<link rel="up" href="glib-data-types.html" title="GLib Data Types">
<link rel="prev" href="glib-Double-ended-Queues.html" title="Double-ended Queues">
<link rel="next" href="glib-Trash-Stacks.html" title="Trash Stacks">
<meta name="generator" content="GTK-Doc V1.17 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="glib-Double-ended-Queues.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="glib-data-types.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GLib Reference Manual</th>
<td><a accesskey="n" href="glib-Trash-Stacks.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#glib-Sequences.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#glib-Sequences.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="glib-Sequences"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="glib-Sequences.top_of_page"></a>Sequences</span></h2>
<p>Sequences — scalable lists</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="glib-Sequences.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;glib.h&gt;

                    <a class="link" href="glib-Sequences.html#GSequence" title="GSequence">GSequence</a>;
typedef             <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter">GSequenceIter</a>;
<a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a>                (<a class="link" href="glib-Sequences.html#GSequenceIterCompareFunc" title="GSequenceIterCompareFunc ()">*GSequenceIterCompareFunc</a>)         (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *a</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *b</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> data</code></em>);

<a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="returnvalue">GSequence</span></a> *         <a class="link" href="glib-Sequences.html#g-sequence-new" title="g_sequence_new ()">g_sequence_new</a>                      (<em class="parameter"><code><a class="link" href="glib-Datasets.html#GDestroyNotify" title="GDestroyNotify ()"><span class="type">GDestroyNotify</span></a> data_destroy</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="glib-Sequences.html#g-sequence-free" title="g_sequence_free ()">g_sequence_free</a>                     (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a> *seq</code></em>);
<a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a>                <a class="link" href="glib-Sequences.html#g-sequence-get-length" title="g_sequence_get_length ()">g_sequence_get_length</a>               (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a> *seq</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="glib-Sequences.html#g-sequence-foreach" title="g_sequence_foreach ()">g_sequence_foreach</a>                  (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a> *seq</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Doubly-Linked-Lists.html#GFunc" title="GFunc ()"><span class="type">GFunc</span></a> func</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="glib-Sequences.html#g-sequence-foreach-range" title="g_sequence_foreach_range ()">g_sequence_foreach_range</a>            (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *begin</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *end</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Doubly-Linked-Lists.html#GFunc" title="GFunc ()"><span class="type">GFunc</span></a> func</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="glib-Sequences.html#g-sequence-sort" title="g_sequence_sort ()">g_sequence_sort</a>                     (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a> *seq</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Doubly-Linked-Lists.html#GCompareDataFunc" title="GCompareDataFunc ()"><span class="type">GCompareDataFunc</span></a> cmp_func</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> cmp_data</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="glib-Sequences.html#g-sequence-sort-iter" title="g_sequence_sort_iter ()">g_sequence_sort_iter</a>                (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a> *seq</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIterCompareFunc" title="GSequenceIterCompareFunc ()"><span class="type">GSequenceIterCompareFunc</span></a> cmp_func</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> cmp_data</code></em>);

<a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="returnvalue">GSequenceIter</span></a> *     <a class="link" href="glib-Sequences.html#g-sequence-get-begin-iter" title="g_sequence_get_begin_iter ()">g_sequence_get_begin_iter</a>           (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a> *seq</code></em>);
<a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="returnvalue">GSequenceIter</span></a> *     <a class="link" href="glib-Sequences.html#g-sequence-get-end-iter" title="g_sequence_get_end_iter ()">g_sequence_get_end_iter</a>             (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a> *seq</code></em>);
<a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="returnvalue">GSequenceIter</span></a> *     <a class="link" href="glib-Sequences.html#g-sequence-get-iter-at-pos" title="g_sequence_get_iter_at_pos ()">g_sequence_get_iter_at_pos</a>          (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a> *seq</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> pos</code></em>);
<a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="returnvalue">GSequenceIter</span></a> *     <a class="link" href="glib-Sequences.html#g-sequence-append" title="g_sequence_append ()">g_sequence_append</a>                   (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a> *seq</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> data</code></em>);
<a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="returnvalue">GSequenceIter</span></a> *     <a class="link" href="glib-Sequences.html#g-sequence-prepend" title="g_sequence_prepend ()">g_sequence_prepend</a>                  (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a> *seq</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> data</code></em>);
<a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="returnvalue">GSequenceIter</span></a> *     <a class="link" href="glib-Sequences.html#g-sequence-insert-before" title="g_sequence_insert_before ()">g_sequence_insert_before</a>            (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *iter</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> data</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="glib-Sequences.html#g-sequence-move" title="g_sequence_move ()">g_sequence_move</a>                     (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *src</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *dest</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="glib-Sequences.html#g-sequence-swap" title="g_sequence_swap ()">g_sequence_swap</a>                     (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *a</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *b</code></em>);
<a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="returnvalue">GSequenceIter</span></a> *     <a class="link" href="glib-Sequences.html#g-sequence-insert-sorted" title="g_sequence_insert_sorted ()">g_sequence_insert_sorted</a>            (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a> *seq</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Doubly-Linked-Lists.html#GCompareDataFunc" title="GCompareDataFunc ()"><span class="type">GCompareDataFunc</span></a> cmp_func</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> cmp_data</code></em>);
<a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="returnvalue">GSequenceIter</span></a> *     <a class="link" href="glib-Sequences.html#g-sequence-insert-sorted-iter" title="g_sequence_insert_sorted_iter ()">g_sequence_insert_sorted_iter</a>       (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a> *seq</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIterCompareFunc" title="GSequenceIterCompareFunc ()"><span class="type">GSequenceIterCompareFunc</span></a> iter_cmp</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> cmp_data</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="glib-Sequences.html#g-sequence-sort-changed" title="g_sequence_sort_changed ()">g_sequence_sort_changed</a>             (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *iter</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Doubly-Linked-Lists.html#GCompareDataFunc" title="GCompareDataFunc ()"><span class="type">GCompareDataFunc</span></a> cmp_func</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> cmp_data</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="glib-Sequences.html#g-sequence-sort-changed-iter" title="g_sequence_sort_changed_iter ()">g_sequence_sort_changed_iter</a>        (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *iter</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIterCompareFunc" title="GSequenceIterCompareFunc ()"><span class="type">GSequenceIterCompareFunc</span></a> iter_cmp</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> cmp_data</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="glib-Sequences.html#g-sequence-remove" title="g_sequence_remove ()">g_sequence_remove</a>                   (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *iter</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="glib-Sequences.html#g-sequence-remove-range" title="g_sequence_remove_range ()">g_sequence_remove_range</a>             (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *begin</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *end</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="glib-Sequences.html#g-sequence-move-range" title="g_sequence_move_range ()">g_sequence_move_range</a>               (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *dest</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *begin</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *end</code></em>);
<a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="returnvalue">GSequenceIter</span></a> *     <a class="link" href="glib-Sequences.html#g-sequence-search" title="g_sequence_search ()">g_sequence_search</a>                   (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a> *seq</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Doubly-Linked-Lists.html#GCompareDataFunc" title="GCompareDataFunc ()"><span class="type">GCompareDataFunc</span></a> cmp_func</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> cmp_data</code></em>);
<a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="returnvalue">GSequenceIter</span></a> *     <a class="link" href="glib-Sequences.html#g-sequence-search-iter" title="g_sequence_search_iter ()">g_sequence_search_iter</a>              (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a> *seq</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIterCompareFunc" title="GSequenceIterCompareFunc ()"><span class="type">GSequenceIterCompareFunc</span></a> iter_cmp</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> cmp_data</code></em>);
<a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="returnvalue">GSequenceIter</span></a> *     <a class="link" href="glib-Sequences.html#g-sequence-lookup" title="g_sequence_lookup ()">g_sequence_lookup</a>                   (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a> *seq</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Doubly-Linked-Lists.html#GCompareDataFunc" title="GCompareDataFunc ()"><span class="type">GCompareDataFunc</span></a> cmp_func</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> cmp_data</code></em>);
<a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="returnvalue">GSequenceIter</span></a> *     <a class="link" href="glib-Sequences.html#g-sequence-lookup-iter" title="g_sequence_lookup_iter ()">g_sequence_lookup_iter</a>              (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a> *seq</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIterCompareFunc" title="GSequenceIterCompareFunc ()"><span class="type">GSequenceIterCompareFunc</span></a> iter_cmp</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> cmp_data</code></em>);

<a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="returnvalue">gpointer</span></a>            <a class="link" href="glib-Sequences.html#g-sequence-get" title="g_sequence_get ()">g_sequence_get</a>                      (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *iter</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="glib-Sequences.html#g-sequence-set" title="g_sequence_set ()">g_sequence_set</a>                      (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *iter</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> data</code></em>);

<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="glib-Sequences.html#g-sequence-iter-is-begin" title="g_sequence_iter_is_begin ()">g_sequence_iter_is_begin</a>            (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *iter</code></em>);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="glib-Sequences.html#g-sequence-iter-is-end" title="g_sequence_iter_is_end ()">g_sequence_iter_is_end</a>              (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *iter</code></em>);
<a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="returnvalue">GSequenceIter</span></a> *     <a class="link" href="glib-Sequences.html#g-sequence-iter-next" title="g_sequence_iter_next ()">g_sequence_iter_next</a>                (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *iter</code></em>);
<a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="returnvalue">GSequenceIter</span></a> *     <a class="link" href="glib-Sequences.html#g-sequence-iter-prev" title="g_sequence_iter_prev ()">g_sequence_iter_prev</a>                (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *iter</code></em>);
<a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a>                <a class="link" href="glib-Sequences.html#g-sequence-iter-get-position" title="g_sequence_iter_get_position ()">g_sequence_iter_get_position</a>        (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *iter</code></em>);
<a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="returnvalue">GSequenceIter</span></a> *     <a class="link" href="glib-Sequences.html#g-sequence-iter-move" title="g_sequence_iter_move ()">g_sequence_iter_move</a>                (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *iter</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> delta</code></em>);
<a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="returnvalue">GSequence</span></a> *         <a class="link" href="glib-Sequences.html#g-sequence-iter-get-sequence" title="g_sequence_iter_get_sequence ()">g_sequence_iter_get_sequence</a>        (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *iter</code></em>);

<a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a>                <a class="link" href="glib-Sequences.html#g-sequence-iter-compare" title="g_sequence_iter_compare ()">g_sequence_iter_compare</a>             (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *a</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *b</code></em>);
<a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="returnvalue">GSequenceIter</span></a> *     <a class="link" href="glib-Sequences.html#g-sequence-range-get-midpoint" title="g_sequence_range_get_midpoint ()">g_sequence_range_get_midpoint</a>       (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *begin</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *end</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="glib-Sequences.description"></a><h2>Description</h2>
<p>
The <a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a> data structure has the API of a list, but is
implemented internally with a balanced binary tree. This means that
it is possible to maintain a sorted list of n elements in time O(n
log n). The data contained in each element can be either integer
values, by using of the <a class="link" href="glib-Type-Conversion-Macros.html" title="Type Conversion Macros">Type Conversion Macros</a>,
or simply pointers to any type of data.
</p>
<p>
A <a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a> is accessed through <em class="firstterm">iterators</em>,
represented by a <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a>. An iterator represents a position
between two elements of the sequence. For example, the
<em class="firstterm">begin</em> iterator represents the gap immediately
before the first element of the sequence, and the
<em class="firstterm">end</em> iterator represents the gap immediately
after the last element. In an empty sequence, the begin and end
iterators are the same.
</p>
<p>
Some methods on <a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a> operate on ranges of items. For example
<a class="link" href="glib-Sequences.html#g-sequence-foreach-range" title="g_sequence_foreach_range ()"><code class="function">g_sequence_foreach_range()</code></a> will call a user-specified function on
each element with the given range. The range is delimited by the
gaps represented by the passed-in iterators, so if you pass in the
begin and end iterators, the range in question is the entire
sequence.
</p>
<p>
The function <a class="link" href="glib-Sequences.html#g-sequence-get" title="g_sequence_get ()"><code class="function">g_sequence_get()</code></a> is used with an iterator to access the
element immediately following the gap that the iterator represents.
The iterator is said to <em class="firstterm">point</em> to that element.
</p>
<p>
Iterators are stable across most operations on a <a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a>. For
example an iterator pointing to some element of a sequence will
continue to point to that element even after the sequence is sorted.
Even moving an element to another sequence using for example
<a class="link" href="glib-Sequences.html#g-sequence-move-range" title="g_sequence_move_range ()"><code class="function">g_sequence_move_range()</code></a> will not invalidate the iterators pointing
to it. The only operation that will invalidate an iterator is when
the element it points to is removed from any sequence.
</p>
</div>
<div class="refsect1">
<a name="glib-Sequences.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GSequence"></a><h3>GSequence</h3>
<pre class="programlisting">typedef struct _GSequence GSequence;</pre>
<p>
The <a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a> struct is an opaque data type representing a
<a class="link" href="glib-Sequences.html" title="Sequences">Sequence</a> data type.
</p>
</div>
<hr>
<div class="refsect2">
<a name="GSequenceIter"></a><h3>GSequenceIter</h3>
<pre class="programlisting">typedef struct _GSequenceNode  GSequenceIter;
</pre>
<p>
The <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> struct is an opaque data type representing an
iterator pointing into a <a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a>.
</p>
</div>
<hr>
<div class="refsect2">
<a name="GSequenceIterCompareFunc"></a><h3>GSequenceIterCompareFunc ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a>                (*GSequenceIterCompareFunc)         (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *a</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *b</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
<p>
A <a class="link" href="glib-Sequences.html#GSequenceIterCompareFunc" title="GSequenceIterCompareFunc ()"><span class="type">GSequenceIterCompareFunc</span></a> is a function used to compare iterators.
It must return zero if the iterators compare equal, a negative value
if <em class="parameter"><code>a</code></em> comes before <em class="parameter"><code>b</code></em>, and a positive value if <em class="parameter"><code>b</code></em> comes before <em class="parameter"><code>a</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>user data</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>zero if the iterators are equal, a negative value if <em class="parameter"><code>a</code></em>
comes before <em class="parameter"><code>b</code></em>, and a positive value if <em class="parameter"><code>b</code></em> comes before
<em class="parameter"><code>a</code></em>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-sequence-new"></a><h3>g_sequence_new ()</h3>
<pre class="programlisting"><a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="returnvalue">GSequence</span></a> *         g_sequence_new                      (<em class="parameter"><code><a class="link" href="glib-Datasets.html#GDestroyNotify" title="GDestroyNotify ()"><span class="type">GDestroyNotify</span></a> data_destroy</code></em>);</pre>
<p>
Creates a new GSequence. The <em class="parameter"><code>data_destroy</code></em> function, if non-<a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> will
be called on all items when the sequence is destroyed and on items that
are removed from the sequence.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>data_destroy</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Datasets.html#GDestroyNotify" title="GDestroyNotify ()"><span class="type">GDestroyNotify</span></a> function, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="g-sequence-free"></a><h3>g_sequence_free ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_sequence_free                     (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a> *seq</code></em>);</pre>
<p>
Frees the memory allocated for <em class="parameter"><code>seq</code></em>. If <em class="parameter"><code>seq</code></em> has a data destroy
function associated with it, that function is called on all items in
<em class="parameter"><code>seq</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>seq</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a>
</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="g-sequence-get-length"></a><h3>g_sequence_get_length ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a>                g_sequence_get_length               (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a> *seq</code></em>);</pre>
<p>
Returns the length of <em class="parameter"><code>seq</code></em>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>seq</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the length of <em class="parameter"><code>seq</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="g-sequence-foreach"></a><h3>g_sequence_foreach ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_sequence_foreach                  (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a> *seq</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Doubly-Linked-Lists.html#GFunc" title="GFunc ()"><span class="type">GFunc</span></a> func</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
Calls <em class="parameter"><code>func</code></em> for each item in the sequence passing <em class="parameter"><code>user_data</code></em>
to the function.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>seq</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
<td>the function to call for each item in <em class="parameter"><code>seq</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data passed to <em class="parameter"><code>func</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="g-sequence-foreach-range"></a><h3>g_sequence_foreach_range ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_sequence_foreach_range            (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *begin</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *end</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Doubly-Linked-Lists.html#GFunc" title="GFunc ()"><span class="type">GFunc</span></a> func</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
Calls <em class="parameter"><code>func</code></em> for each item in the range (<em class="parameter"><code>begin</code></em>, <em class="parameter"><code>end</code></em>) passing
<em class="parameter"><code>user_data</code></em> to the function.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>begin</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>end</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Doubly-Linked-Lists.html#GFunc" title="GFunc ()"><span class="type">GFunc</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data passed to <em class="parameter"><code>func</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="g-sequence-sort"></a><h3>g_sequence_sort ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_sequence_sort                     (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a> *seq</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Doubly-Linked-Lists.html#GCompareDataFunc" title="GCompareDataFunc ()"><span class="type">GCompareDataFunc</span></a> cmp_func</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> cmp_data</code></em>);</pre>
<p>
Sorts <em class="parameter"><code>seq</code></em> using <em class="parameter"><code>cmp_func</code></em>.
</p>
<p>
<em class="parameter"><code>cmp_func</code></em> is passed two items of <em class="parameter"><code>seq</code></em> and should
return 0 if they are equal, a negative value if the
first comes before the second, and a positive value
if the second comes before the first.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>seq</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cmp_func</code></em> :</span></p></td>
<td>the function used to sort the sequence</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cmp_data</code></em> :</span></p></td>
<td>user data passed to <em class="parameter"><code>cmp_func</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="g-sequence-sort-iter"></a><h3>g_sequence_sort_iter ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_sequence_sort_iter                (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a> *seq</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIterCompareFunc" title="GSequenceIterCompareFunc ()"><span class="type">GSequenceIterCompareFunc</span></a> cmp_func</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> cmp_data</code></em>);</pre>
<p>
Like <a class="link" href="glib-Sequences.html#g-sequence-sort" title="g_sequence_sort ()"><code class="function">g_sequence_sort()</code></a>, but uses a <a class="link" href="glib-Sequences.html#GSequenceIterCompareFunc" title="GSequenceIterCompareFunc ()"><span class="type">GSequenceIterCompareFunc</span></a> instead
of a GCompareDataFunc as the compare function
</p>
<p>
<em class="parameter"><code>cmp_func</code></em> is called with two iterators pointing into <em class="parameter"><code>seq</code></em>. It should
return 0 if the iterators are equal, a negative value if the first
iterator comes before the second, and a positive value if the second
iterator comes before the first.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>seq</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cmp_func</code></em> :</span></p></td>
<td>the function used to compare iterators in the sequence</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cmp_data</code></em> :</span></p></td>
<td>user data passed to <em class="parameter"><code>cmp_func</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="g-sequence-get-begin-iter"></a><h3>g_sequence_get_begin_iter ()</h3>
<pre class="programlisting"><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="returnvalue">GSequenceIter</span></a> *     g_sequence_get_begin_iter           (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a> *seq</code></em>);</pre>
<p>
Returns the begin iterator for <em class="parameter"><code>seq</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>seq</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the begin iterator for <em class="parameter"><code>seq</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="g-sequence-get-end-iter"></a><h3>g_sequence_get_end_iter ()</h3>
<pre class="programlisting"><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="returnvalue">GSequenceIter</span></a> *     g_sequence_get_end_iter             (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a> *seq</code></em>);</pre>
<p>
Returns the end iterator for <em class="parameter"><code>seg</code></em>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>seq</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the end iterator for <em class="parameter"><code>seq</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="g-sequence-get-iter-at-pos"></a><h3>g_sequence_get_iter_at_pos ()</h3>
<pre class="programlisting"><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="returnvalue">GSequenceIter</span></a> *     g_sequence_get_iter_at_pos          (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a> *seq</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> pos</code></em>);</pre>
<p>
Returns the iterator at position <em class="parameter"><code>pos</code></em>. If <em class="parameter"><code>pos</code></em> is negative or larger
than the number of items in <em class="parameter"><code>seq</code></em>, the end iterator is returned.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>seq</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>pos</code></em> :</span></p></td>
<td>a position in <em class="parameter"><code>seq</code></em>, or -1 for the end.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> at position <em class="parameter"><code>pos</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="g-sequence-append"></a><h3>g_sequence_append ()</h3>
<pre class="programlisting"><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="returnvalue">GSequenceIter</span></a> *     g_sequence_append                   (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a> *seq</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
<p>
Adds a new item to the end of <em class="parameter"><code>seq</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>seq</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>the data for the new item</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>an iterator pointing to the new item</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="g-sequence-prepend"></a><h3>g_sequence_prepend ()</h3>
<pre class="programlisting"><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="returnvalue">GSequenceIter</span></a> *     g_sequence_prepend                  (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a> *seq</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
<p>
Adds a new item to the front of <em class="parameter"><code>seq</code></em>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>seq</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>the data for the new item</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>an iterator pointing to the new item</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="g-sequence-insert-before"></a><h3>g_sequence_insert_before ()</h3>
<pre class="programlisting"><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="returnvalue">GSequenceIter</span></a> *     g_sequence_insert_before            (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *iter</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
<p>
Inserts a new item just before the item pointed to by <em class="parameter"><code>iter</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>the data for the new item</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>an iterator pointing to the new item</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="g-sequence-move"></a><h3>g_sequence_move ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_sequence_move                     (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *src</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *dest</code></em>);</pre>
<p>
Moves the item pointed to by <em class="parameter"><code>src</code></em> to the position indicated by <em class="parameter"><code>dest</code></em>.
After calling this function <em class="parameter"><code>dest</code></em> will point to the position immediately
after <em class="parameter"><code>src</code></em>. It is allowed for <em class="parameter"><code>src</code></em> and <em class="parameter"><code>dest</code></em> to point into different
sequences.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>src</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> pointing to the item to move</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dest</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> pointing to the position to which
the item is moved.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="g-sequence-swap"></a><h3>g_sequence_swap ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_sequence_swap                     (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *a</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *b</code></em>);</pre>
<p>
Swaps the items pointed to by <em class="parameter"><code>a</code></em> and <em class="parameter"><code>b</code></em>. It is allowed for <em class="parameter"><code>a</code></em> and <em class="parameter"><code>b</code></em>
to point into difference sequences.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="g-sequence-insert-sorted"></a><h3>g_sequence_insert_sorted ()</h3>
<pre class="programlisting"><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="returnvalue">GSequenceIter</span></a> *     g_sequence_insert_sorted            (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a> *seq</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Doubly-Linked-Lists.html#GCompareDataFunc" title="GCompareDataFunc ()"><span class="type">GCompareDataFunc</span></a> cmp_func</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> cmp_data</code></em>);</pre>
<p>
Inserts <em class="parameter"><code>data</code></em> into <em class="parameter"><code>sequence</code></em> using <em class="parameter"><code>func</code></em> to determine the new
position. The sequence must already be sorted according to <em class="parameter"><code>cmp_func</code></em>;
otherwise the new position of <em class="parameter"><code>data</code></em> is undefined.
</p>
<p>
<em class="parameter"><code>cmp_func</code></em> is called with two items of the <em class="parameter"><code>seq</code></em> and <em class="parameter"><code>user_data</code></em>.
It should return 0 if the items are equal, a negative value
if the first item comes before the second, and a positive value
if the second  item comes before the first.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>seq</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>the data to insert</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cmp_func</code></em> :</span></p></td>
<td>the function used to compare items in the sequence</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cmp_data</code></em> :</span></p></td>
<td>user data passed to <em class="parameter"><code>cmp_func</code></em>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> pointing to the new item.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="g-sequence-insert-sorted-iter"></a><h3>g_sequence_insert_sorted_iter ()</h3>
<pre class="programlisting"><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="returnvalue">GSequenceIter</span></a> *     g_sequence_insert_sorted_iter       (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a> *seq</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIterCompareFunc" title="GSequenceIterCompareFunc ()"><span class="type">GSequenceIterCompareFunc</span></a> iter_cmp</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> cmp_data</code></em>);</pre>
<p>
Like <a class="link" href="glib-Sequences.html#g-sequence-insert-sorted" title="g_sequence_insert_sorted ()"><code class="function">g_sequence_insert_sorted()</code></a>, but uses
a <a class="link" href="glib-Sequences.html#GSequenceIterCompareFunc" title="GSequenceIterCompareFunc ()"><span class="type">GSequenceIterCompareFunc</span></a> instead of a <a class="link" href="glib-Doubly-Linked-Lists.html#GCompareDataFunc" title="GCompareDataFunc ()"><span class="type">GCompareDataFunc</span></a> as
the compare function.
</p>
<p>
<em class="parameter"><code>iter_cmp</code></em> is called with two iterators pointing into <em class="parameter"><code>seq</code></em>.
It should return 0 if the iterators are equal, a negative
value if the first iterator comes before the second, and a
positive value if the second iterator comes before the first.
</p>
<p>
It is called with two iterators pointing into <em class="parameter"><code>seq</code></em>. It should
return 0 if the iterators are equal, a negative value if the
first iterator comes before the second, and a positive value
if the second iterator comes before the first.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>seq</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>data for the new item</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter_cmp</code></em> :</span></p></td>
<td>the function used to compare iterators in the sequence</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cmp_data</code></em> :</span></p></td>
<td>user data passed to <em class="parameter"><code>cmp_func</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> pointing to the new item</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="g-sequence-sort-changed"></a><h3>g_sequence_sort_changed ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_sequence_sort_changed             (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *iter</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Doubly-Linked-Lists.html#GCompareDataFunc" title="GCompareDataFunc ()"><span class="type">GCompareDataFunc</span></a> cmp_func</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> cmp_data</code></em>);</pre>
<p>
Moves the data pointed to a new position as indicated by <em class="parameter"><code>cmp_func</code></em>. This
function should be called for items in a sequence already sorted according
to <em class="parameter"><code>cmp_func</code></em> whenever some aspect of an item changes so that <em class="parameter"><code>cmp_func</code></em>
may return different values for that item.
</p>
<p>
<em class="parameter"><code>cmp_func</code></em> is called with two items of the <em class="parameter"><code>seq</code></em> and <em class="parameter"><code>user_data</code></em>.
It should return 0 if the items are equal, a negative value if
the first item comes before the second, and a positive value if
the second item comes before the first.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
<td>A <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cmp_func</code></em> :</span></p></td>
<td>the function used to compare items in the sequence</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cmp_data</code></em> :</span></p></td>
<td>user data passed to <em class="parameter"><code>cmp_func</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="g-sequence-sort-changed-iter"></a><h3>g_sequence_sort_changed_iter ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_sequence_sort_changed_iter        (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *iter</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIterCompareFunc" title="GSequenceIterCompareFunc ()"><span class="type">GSequenceIterCompareFunc</span></a> iter_cmp</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> cmp_data</code></em>);</pre>
<p>
Like <a class="link" href="glib-Sequences.html#g-sequence-sort-changed" title="g_sequence_sort_changed ()"><code class="function">g_sequence_sort_changed()</code></a>, but uses
a <a class="link" href="glib-Sequences.html#GSequenceIterCompareFunc" title="GSequenceIterCompareFunc ()"><span class="type">GSequenceIterCompareFunc</span></a> instead of a <a class="link" href="glib-Doubly-Linked-Lists.html#GCompareDataFunc" title="GCompareDataFunc ()"><span class="type">GCompareDataFunc</span></a> as
the compare function.
</p>
<p>
<em class="parameter"><code>iter_cmp</code></em> is called with two iterators pointing into <em class="parameter"><code>seq</code></em>. It should
return 0 if the iterators are equal, a negative value if the first
iterator comes before the second, and a positive value if the second
iterator comes before the first.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter_cmp</code></em> :</span></p></td>
<td>the function used to compare iterators in the sequence</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cmp_data</code></em> :</span></p></td>
<td>user data passed to <em class="parameter"><code>cmp_func</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="g-sequence-remove"></a><h3>g_sequence_remove ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_sequence_remove                   (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *iter</code></em>);</pre>
<p>
Removes the item pointed to by <em class="parameter"><code>iter</code></em>. It is an error to pass the
end iterator to this function.
</p>
<p>
If the sequnce has a data destroy function associated with it, this
function is called on the data for the removed item.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="g-sequence-remove-range"></a><h3>g_sequence_remove_range ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_sequence_remove_range             (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *begin</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *end</code></em>);</pre>
<p>
Removes all items in the (<em class="parameter"><code>begin</code></em>, <em class="parameter"><code>end</code></em>) range.
</p>
<p>
If the sequence has a data destroy function associated with it, this
function is called on the data for the removed items.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>begin</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>end</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="g-sequence-move-range"></a><h3>g_sequence_move_range ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_sequence_move_range               (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *dest</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *begin</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *end</code></em>);</pre>
<p>
Inserts the (<em class="parameter"><code>begin</code></em>, <em class="parameter"><code>end</code></em>) range at the destination pointed to by ptr.
The <em class="parameter"><code>begin</code></em> and <em class="parameter"><code>end</code></em> iters must point into the same sequence. It is
allowed for <em class="parameter"><code>dest</code></em> to point to a different sequence than the one pointed
into by <em class="parameter"><code>begin</code></em> and <em class="parameter"><code>end</code></em>.
</p>
<p>
If <em class="parameter"><code>dest</code></em> is NULL, the range indicated by <em class="parameter"><code>begin</code></em> and <em class="parameter"><code>end</code></em> is
removed from the sequence. If <em class="parameter"><code>dest</code></em> iter points to a place within
the (<em class="parameter"><code>begin</code></em>, <em class="parameter"><code>end</code></em>) range, the range does not move.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>dest</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>begin</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>end</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="g-sequence-search"></a><h3>g_sequence_search ()</h3>
<pre class="programlisting"><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="returnvalue">GSequenceIter</span></a> *     g_sequence_search                   (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a> *seq</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Doubly-Linked-Lists.html#GCompareDataFunc" title="GCompareDataFunc ()"><span class="type">GCompareDataFunc</span></a> cmp_func</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> cmp_data</code></em>);</pre>
<p>
Returns an iterator pointing to the position where <em class="parameter"><code>data</code></em> would
be inserted according to <em class="parameter"><code>cmp_func</code></em> and <em class="parameter"><code>cmp_data</code></em>.
</p>
<p>
<em class="parameter"><code>cmp_func</code></em> is called with two items of the <em class="parameter"><code>seq</code></em> and <em class="parameter"><code>user_data</code></em>.
It should return 0 if the items are equal, a negative value if
the first item comes before the second, and a positive value if
the second item comes before the first.
</p>
<p>
If you are simply searching for an existing element of the sequence,
consider using <a class="link" href="glib-Sequences.html#g-sequence-lookup" title="g_sequence_lookup ()"><code class="function">g_sequence_lookup()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>seq</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>data for the new item</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cmp_func</code></em> :</span></p></td>
<td>the function used to compare items in the sequence</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cmp_data</code></em> :</span></p></td>
<td>user data passed to <em class="parameter"><code>cmp_func</code></em>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>an <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> pointing to the position where <em class="parameter"><code>data</code></em>
would have been inserted according to <em class="parameter"><code>cmp_func</code></em> and <em class="parameter"><code>cmp_data</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="g-sequence-search-iter"></a><h3>g_sequence_search_iter ()</h3>
<pre class="programlisting"><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="returnvalue">GSequenceIter</span></a> *     g_sequence_search_iter              (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a> *seq</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIterCompareFunc" title="GSequenceIterCompareFunc ()"><span class="type">GSequenceIterCompareFunc</span></a> iter_cmp</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> cmp_data</code></em>);</pre>
<p>
Like <a class="link" href="glib-Sequences.html#g-sequence-search" title="g_sequence_search ()"><code class="function">g_sequence_search()</code></a>, but uses a <a class="link" href="glib-Sequences.html#GSequenceIterCompareFunc" title="GSequenceIterCompareFunc ()"><span class="type">GSequenceIterCompareFunc</span></a>
instead of a <a class="link" href="glib-Doubly-Linked-Lists.html#GCompareDataFunc" title="GCompareDataFunc ()"><span class="type">GCompareDataFunc</span></a> as the compare function.
</p>
<p>
<em class="parameter"><code>iter_cmp</code></em> is called with two iterators pointing into <em class="parameter"><code>seq</code></em>.
It should return 0 if the iterators are equal, a negative value
if the first iterator comes before the second, and a positive
value if the second iterator comes before the first.
</p>
<p>
If you are simply searching for an existing element of the sequence,
consider using <a class="link" href="glib-Sequences.html#g-sequence-lookup-iter" title="g_sequence_lookup_iter ()"><code class="function">g_sequence_lookup_iter()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>seq</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>data for the new item</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter_cmp</code></em> :</span></p></td>
<td>the function used to compare iterators in the sequence</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cmp_data</code></em> :</span></p></td>
<td>user data passed to <em class="parameter"><code>iter_cmp</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> pointing to the position in <em class="parameter"><code>seq</code></em>
where <em class="parameter"><code>data</code></em> would have been inserted according to <em class="parameter"><code>iter_cmp</code></em>
and <em class="parameter"><code>cmp_data</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="g-sequence-lookup"></a><h3>g_sequence_lookup ()</h3>
<pre class="programlisting"><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="returnvalue">GSequenceIter</span></a> *     g_sequence_lookup                   (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a> *seq</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Doubly-Linked-Lists.html#GCompareDataFunc" title="GCompareDataFunc ()"><span class="type">GCompareDataFunc</span></a> cmp_func</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> cmp_data</code></em>);</pre>
<p>
Returns an iterator pointing to the position of the first item found
equal to <em class="parameter"><code>data</code></em> according to <em class="parameter"><code>cmp_func</code></em> and <em class="parameter"><code>cmp_data</code></em>. If more than one
item is equal, it is not guaranteed that it is the first which is
returned. In that case, you can use <a class="link" href="glib-Sequences.html#g-sequence-iter-next" title="g_sequence_iter_next ()"><code class="function">g_sequence_iter_next()</code></a> and
<a class="link" href="glib-Sequences.html#g-sequence-iter-prev" title="g_sequence_iter_prev ()"><code class="function">g_sequence_iter_prev()</code></a> to get others.
</p>
<p>
<em class="parameter"><code>cmp_func</code></em> is called with two items of the <em class="parameter"><code>seq</code></em> and <em class="parameter"><code>user_data</code></em>.
It should return 0 if the items are equal, a negative value if
the first item comes before the second, and a positive value if
the second item comes before the first.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>seq</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>data to lookup</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cmp_func</code></em> :</span></p></td>
<td>the function used to compare items in the sequence</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cmp_data</code></em> :</span></p></td>
<td>user data passed to <em class="parameter"><code>cmp_func</code></em>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>an <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> pointing to the position of the
first item found equal to <em class="parameter"><code>data</code></em> according to <em class="parameter"><code>cmp_func</code></em> and <em class="parameter"><code>cmp_data</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.28</p>
</div>
<hr>
<div class="refsect2">
<a name="g-sequence-lookup-iter"></a><h3>g_sequence_lookup_iter ()</h3>
<pre class="programlisting"><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="returnvalue">GSequenceIter</span></a> *     g_sequence_lookup_iter              (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a> *seq</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIterCompareFunc" title="GSequenceIterCompareFunc ()"><span class="type">GSequenceIterCompareFunc</span></a> iter_cmp</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> cmp_data</code></em>);</pre>
<p>
Like <a class="link" href="glib-Sequences.html#g-sequence-lookup" title="g_sequence_lookup ()"><code class="function">g_sequence_lookup()</code></a>, but uses a <a class="link" href="glib-Sequences.html#GSequenceIterCompareFunc" title="GSequenceIterCompareFunc ()"><span class="type">GSequenceIterCompareFunc</span></a>
instead of a <a class="link" href="glib-Doubly-Linked-Lists.html#GCompareDataFunc" title="GCompareDataFunc ()"><span class="type">GCompareDataFunc</span></a> as the compare function.
</p>
<p>
<em class="parameter"><code>iter_cmp</code></em> is called with two iterators pointing into <em class="parameter"><code>seq</code></em>.
It should return 0 if the iterators are equal, a negative value
if the first iterator comes before the second, and a positive
value if the second iterator comes before the first.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>seq</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>data to lookup</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter_cmp</code></em> :</span></p></td>
<td>the function used to compare iterators in the sequence</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cmp_data</code></em> :</span></p></td>
<td>user data passed to <em class="parameter"><code>iter_cmp</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>an <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> pointing to the position of
the first item found equal to <em class="parameter"><code>data</code></em> according to <em class="parameter"><code>cmp_func</code></em>
and <em class="parameter"><code>cmp_data</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.28</p>
</div>
<hr>
<div class="refsect2">
<a name="g-sequence-get"></a><h3>g_sequence_get ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="returnvalue">gpointer</span></a>            g_sequence_get                      (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *iter</code></em>);</pre>
<p>
Returns the data that <em class="parameter"><code>iter</code></em> points to.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the data that <em class="parameter"><code>iter</code></em> points to</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="g-sequence-set"></a><h3>g_sequence_set ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_sequence_set                      (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *iter</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
<p>
Changes the data for the item pointed to by <em class="parameter"><code>iter</code></em> to be <em class="parameter"><code>data</code></em>. If
the sequence has a data destroy function associated with it, that
function is called on the existing data that <em class="parameter"><code>iter</code></em> pointed to.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>new data for the item</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="g-sequence-iter-is-begin"></a><h3>g_sequence_iter_is_begin ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            g_sequence_iter_is_begin            (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *iter</code></em>);</pre>
<p>
Returns whether <em class="parameter"><code>iter</code></em> is the begin iterator
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>whether <em class="parameter"><code>iter</code></em> is the begin iterator</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="g-sequence-iter-is-end"></a><h3>g_sequence_iter_is_end ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            g_sequence_iter_is_end              (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *iter</code></em>);</pre>
<p>
Returns whether <em class="parameter"><code>iter</code></em> is the end iterator
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>Whether <em class="parameter"><code>iter</code></em> is the end iterator.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="g-sequence-iter-next"></a><h3>g_sequence_iter_next ()</h3>
<pre class="programlisting"><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="returnvalue">GSequenceIter</span></a> *     g_sequence_iter_next                (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *iter</code></em>);</pre>
<p>
Returns an iterator pointing to the next position after <em class="parameter"><code>iter</code></em>. If
<em class="parameter"><code>iter</code></em> is the end iterator, the end iterator is returned.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> pointing to the next position after <em class="parameter"><code>iter</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="g-sequence-iter-prev"></a><h3>g_sequence_iter_prev ()</h3>
<pre class="programlisting"><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="returnvalue">GSequenceIter</span></a> *     g_sequence_iter_prev                (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *iter</code></em>);</pre>
<p>
Returns an iterator pointing to the previous position before <em class="parameter"><code>iter</code></em>. If
<em class="parameter"><code>iter</code></em> is the begin iterator, the begin iterator is returned.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> pointing to the previous position before
<em class="parameter"><code>iter</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="g-sequence-iter-get-position"></a><h3>g_sequence_iter_get_position ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a>                g_sequence_iter_get_position        (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *iter</code></em>);</pre>
<p>
Returns the position of <em class="parameter"><code>iter</code></em>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the position of <em class="parameter"><code>iter</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="g-sequence-iter-move"></a><h3>g_sequence_iter_move ()</h3>
<pre class="programlisting"><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="returnvalue">GSequenceIter</span></a> *     g_sequence_iter_move                (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *iter</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> delta</code></em>);</pre>
<p>
Returns the <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> which is <em class="parameter"><code>delta</code></em> positions away from <em class="parameter"><code>iter</code></em>.
If <em class="parameter"><code>iter</code></em> is closer than -<em class="parameter"><code>delta</code></em> positions to the beginning of the sequence,
the begin iterator is returned. If <em class="parameter"><code>iter</code></em> is closer than <em class="parameter"><code>delta</code></em> positions
to the end of the sequence, the end iterator is returned.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>delta</code></em> :</span></p></td>
<td>A positive or negative number indicating how many positions away
from <em class="parameter"><code>iter</code></em> the returned <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> will be.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> which is <em class="parameter"><code>delta</code></em> positions away from <em class="parameter"><code>iter</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="g-sequence-iter-get-sequence"></a><h3>g_sequence_iter_get_sequence ()</h3>
<pre class="programlisting"><a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="returnvalue">GSequence</span></a> *         g_sequence_iter_get_sequence        (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *iter</code></em>);</pre>
<p>
Returns the <a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a> that <em class="parameter"><code>iter</code></em> points into.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the <a class="link" href="glib-Sequences.html#GSequence" title="GSequence"><span class="type">GSequence</span></a> that <em class="parameter"><code>iter</code></em> points into.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="g-sequence-iter-compare"></a><h3>g_sequence_iter_compare ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a>                g_sequence_iter_compare             (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *a</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *b</code></em>);</pre>
<p>
Returns a negative number if <em class="parameter"><code>a</code></em> comes before <em class="parameter"><code>b</code></em>, 0 if they are equal,
and a positive number if <em class="parameter"><code>a</code></em> comes after <em class="parameter"><code>b</code></em>.
</p>
<p>
The <em class="parameter"><code>a</code></em> and <em class="parameter"><code>b</code></em> iterators must point into the same sequence.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A negative number if <em class="parameter"><code>a</code></em> comes before <em class="parameter"><code>b</code></em>, 0 if they are
equal, and a positive number if <em class="parameter"><code>a</code></em> comes after <em class="parameter"><code>b</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="g-sequence-range-get-midpoint"></a><h3>g_sequence_range_get_midpoint ()</h3>
<pre class="programlisting"><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="returnvalue">GSequenceIter</span></a> *     g_sequence_range_get_midpoint       (<em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *begin</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> *end</code></em>);</pre>
<p>
Finds an iterator somewhere in the range (<em class="parameter"><code>begin</code></em>, <em class="parameter"><code>end</code></em>). This
iterator will be close to the middle of the range, but is not
guaranteed to be <span class="emphasis"><em>exactly</em></span> in the middle.
</p>
<p>
The <em class="parameter"><code>begin</code></em> and <em class="parameter"><code>end</code></em> iterators must both point to the same sequence and
<em class="parameter"><code>begin</code></em> must come before or be equal to <em class="parameter"><code>end</code></em> in the sequence.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>begin</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>end</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A <a class="link" href="glib-Sequences.html#GSequenceIter" title="GSequenceIter"><span class="type">GSequenceIter</span></a> pointing somewhere in the
(<em class="parameter"><code>begin</code></em>, <em class="parameter"><code>end</code></em>) range.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.17</div>
</body>
</html>